<?php
namespace App\Admin\Grid\Tools;

use App\Admin\Renderable\ImportUserForm;
use App\Models\Media;
use Dcat\Admin\Grid\Tools\AbstractTool;
use Dcat\Admin\Widgets\Modal;

class RefreshMediaButton extends AbstractTool{
    protected $title = '刷新建档媒介';

    public function confirm()
    {
        return '确定要刷新吗?';
    }

    public function handle(){
        Media::refreshMediaType();
        return $this->response()->success("刷新成功!")->refresh();
    }

}
